package com.demo.serviceI.UserI;

import com.demo.mapper.SysUserModules.SysUserMapper;
import com.demo.model.Role.Role;
import com.demo.model.SysUser.SysUser;
import com.demo.model.SysUser.SysUserQuery.SysUserQuery;
import com.demo.service.User.SysUserservice;
import com.demo.tool.paging;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.text.ParseException;
import java.util.Collection;
import java.util.List;

@Service
public class SysUserServiceI implements SysUserservice {

    @Autowired
  private SysUserMapper userMapper;

    @Override
    public SysUser getUserOneByUid(Long uid) {
        return userMapper.getUserOne(uid);
    }

    @Override
    public SysUser getUserOneByName(String username) {
        return userMapper.getUserByName(username);
    }

    @Override
    public int addUser(SysUser sysUser) {
        return userMapper.save(sysUser);
    }

    @Override
    public List<Role> getRolesByUid(Long uid) {
        return userMapper.getRolesByUid(uid);
    }

    @Override
    public SysUser findById(Serializable id) {
        return null;
    }

    @Override
    public SysUser findByName(String name) {
        return null;
    }

    @Override
    public int save(SysUser sysUser) {
        return 0;
    }

    @Override
    public int saveAll(Collection<SysUser> collection) {
        return 0;
    }

    @Override
    public int update(SysUser sysUser) {

        return userMapper.update(sysUser);
    }

    @Override
    public int delById(Serializable id) {
        return 0;
    }

    @Override
    public int delByIdIn(Serializable[] ids) {
        return 0;
    }

    @Override
    public paging findAllpaging(Integer page, Integer pageSize, SysUserQuery sysUserQuery) throws ParseException {
        return null;
    }

    @Override
    public List<SysUser> findAll(SysUserQuery sysUserQuery) {
        return null;
    }


}
